<%-- 
    Document   : w_revenuebyproduct
    Created on : Sep 22, 2013, 3:11:55 PM
    Author     : Trang
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="model.Role"%>
<%@page import="model.Staff"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@taglib uri="http://displaytag.sf.net" prefix="display" %>

<!DOCTYPE html>
<%
    Staff staff = (Staff) session.getAttribute("staff");

    if (staff == null) {
        response.sendRedirect(request.getContextPath() + "/Administration");
    }  else {
%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Warehousing Management</title>
        <link href="<%= request.getContextPath()%>/css/style_for_page.css" rel="stylesheet" type="text/css"/>
        <link href="<%= request.getContextPath()%>/css/style_for_menu.css" rel="stylesheet" type="text/css"/>
        <link href="<%= request.getContextPath()%>/css/style_addtion.css" rel="stylesheet" type="text/css"/>
        <link href="<%= request.getContextPath()%>/css/adMenu.css" rel="stylesheet" type="text/css"/>
        <link href="<%= request.getContextPath()%>/css/tHeaderFooter.css" rel="stylesheet" type="text/css"/>
        <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
        <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
        <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
        <link rel="stylesheet" href="/resources/demos/style.css" />

                <script>
                    $(function() {
                        $('#start').datepicker();
                        $('#end').datepicker();
                    });
                </script>
    </head>
    <style type="text/css">
        .tableRevenue2 table{
        width: 1024px;
       border:1px solid black;
       border-collapse:collapse;
      }
     .tableRevenue2 table tbody td{
        border-width:1px;border-color:black;border-style:solid;
        height: 20px;
        text-align: center;
        
      }
      .tableRevenue2 table thead th{
        border-width:1px;border-color:black;border-style:solid;
        
        font-weight: bold;
        font-size: 16px;font-family: tahoma;
  }
    </style>
    <body class="container2">
        <% int i = 0;%>
    <div class="divcontent">
        <div class="headButton">
            <div id="reportheader">
                <br>
                <br>
                <h3><b>COMPUTER PRODUCT RETAILER</b></h3>
                <p><b>23 Nguyen Trai - Thanh Xuan - Ha Noi</b></p>
                <p><b>0982396012/0914555444</b></p>

                <br>
            </div>
            <div id="reportheader">
            <div style="margin: auto;  ">
                <h2 style="margin-left: 450px;  "><s:property value="title"/></h2>    
                <p style="margin-left: 420px;  "><i><s:property value="date"/></i></p> 
            </div>
           
            </br>
        </div>
    </div>
    <div class="content" style="min-height: 300px;">  
        <div class="tableRevenue2">  
            <table>
                <thead>
                    <tr>
                        <th style="width:  60px;"> No </th> 
                        <th>Product Code</th>
                        <th>Product Name</th>
                        <th>Brand</th>
                        <th>Unit Price ($)</th>
                        <th style="width:  160px;">Total Quantity</th>
                        <th style="width:  130px;">Total Price ($)</th>  
                    </tr>
                </thead>
                <tbody>

                <form name="fom" method="post"> 

                    <s:iterator value="revenues">
                        <% i++;%>
                        <tr> 
                            <td><%out.print(i);%></td>
                            <td><s:property value="product.code"/></td>
                            <td><s:property value="product.name"/></td>
                            <td><s:property value="product.brand"/></td>
                            <td><s:property value="price"/></td>
                            <td><s:property value="totalQuantity"/></td>
                            <td style="text-align: right;"><s:property value="totalPrice"/></td>                    
                        </tr>       
                    </s:iterator> 
                </form>
                </tbody>
            </table>
            <div style="margin: auto;width: 1024px;">
                <table style="float: right; border-color: white;">
                    <tr>
                        <td style="float: left;border-color: white;"><b><i>Total Revenue</i></b></td>
                       <td style="float: right;border-color: white;"><b><s:property value="totalAmount + ' $'"/></b></td>
                    </tr>                     
                </table>
            </div>
        </div>


    </div>   
</div>
<footer>
    <div id="footer">
        <%@include file="/include/iFooter.jsp" %>
    </div>    
</footer>
</body>
</html>
<%
    }
%>